3.52 \(\int \frac{(2+3 x+5 x^2)^3}{(3-x+2 x^2)^3} \, dx\)

Optimal. Leaf size=84 \[ \frac{121 (21193-12828 x)}{33856 \left (2 x^2-x+3\right )}-\frac{1331 (17-45 x)}{1472 \left (2 x^2-x+3\right )^2}+\frac{825}{32} \log \left (2 x^2-x+3\right )+\frac{125 x}{8}+\frac{165099 \tan ^{-1}\left (\frac{1-4 x}{\sqrt{23}}\right )}{8464 \sqrt{23}} \]

[Out]

(125*x)/8 - (1331*(17 - 45*x))/(1472*(3 - x + 2*x^2)^2) + (121*(21193 - 12828*x))/(33856*(3 - x + 2*x^2)) + (1
65099*ArcTan[(1 - 4*x)/Sqrt[23]])/(8464*Sqrt[23]) + (825*Log[3 - x + 2*x^2])/32

________________________________________________________________________________________

Rubi [A]  time = 0.0865576, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {1660, 1657, 634, 618, 204, 628} \[ \frac{121 (21193-12828 x)}{33856 \left (2 x^2-x+3\right )}-\frac{1331 (17-45 x)}{1472 \left (2 x^2-x+3\right )^2}+\frac{825}{32} \log \left (2 x^2-x+3\right )+\frac{125 x}{8}+\frac{165099 \tan ^{-1}\left (\frac{1-4 x}{\sqrt{23}}\right )}{8464 \sqrt{23}} \]

Antiderivative was successfully verified.

[In]

Int[(2 + 3*x + 5*x^2)^3/(3 - x + 2*x^2)^3,x]

[Out]

(125*x)/8 - (1331*(17 - 45*x))/(1472*(3 - x + 2*x^2)^2) + (121*(21193 - 12828*x))/(33856*(3 - x + 2*x^2)) + (1
65099*ArcTan[(1 - 4*x)/Sqrt[23]])/(8464*Sqrt[23]) + (825*Log[3 - x + 2*x^2])/32

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{\left (2+3 x+5 x^2\right )^3}{\left (3-x+2 x^2\right )^3} \, dx &=-\frac{1331 (17-45 x)}{1472 \left (3-x+2 x^2\right )^2}+\frac{1}{46} \int \frac{-\frac{40885}{32}-\frac{19067 x}{8}+\frac{22195 x^2}{4}+\frac{13225 x^3}{2}+2875 x^4}{\left (3-x+2 x^2\right )^2} \, dx\\ &=-\frac{1331 (17-45 x)}{1472 \left (3-x+2 x^2\right )^2}+\frac{121 (21193-12828 x)}{33856 \left (3-x+2 x^2\right )}+\frac{\int \frac{\frac{23997}{2}+92575 x+\frac{66125 x^2}{2}}{3-x+2 x^2} \, dx}{1058}\\ &=-\frac{1331 (17-45 x)}{1472 \left (3-x+2 x^2\right )^2}+\frac{121 (21193-12828 x)}{33856 \left (3-x+2 x^2\right )}+\frac{\int \left (\frac{66125}{4}-\frac{33 (4557-13225 x)}{4 \left (3-x+2 x^2\right )}\right ) \, dx}{1058}\\ &=\frac{125 x}{8}-\frac{1331 (17-45 x)}{1472 \left (3-x+2 x^2\right )^2}+\frac{121 (21193-12828 x)}{33856 \left (3-x+2 x^2\right )}-\frac{33 \int \frac{4557-13225 x}{3-x+2 x^2} \, dx}{4232}\\ &=\frac{125 x}{8}-\frac{1331 (17-45 x)}{1472 \left (3-x+2 x^2\right )^2}+\frac{121 (21193-12828 x)}{33856 \left (3-x+2 x^2\right )}-\frac{165099 \int \frac{1}{3-x+2 x^2} \, dx}{16928}+\frac{825}{32} \int \frac{-1+4 x}{3-x+2 x^2} \, dx\\ &=\frac{125 x}{8}-\frac{1331 (17-45 x)}{1472 \left (3-x+2 x^2\right )^2}+\frac{121 (21193-12828 x)}{33856 \left (3-x+2 x^2\right )}+\frac{825}{32} \log \left (3-x+2 x^2\right )+\frac{165099 \operatorname{Subst}\left (\int \frac{1}{-23-x^2} \, dx,x,-1+4 x\right )}{8464}\\ &=\frac{125 x}{8}-\frac{1331 (17-45 x)}{1472 \left (3-x+2 x^2\right )^2}+\frac{121 (21193-12828 x)}{33856 \left (3-x+2 x^2\right )}+\frac{165099 \tan ^{-1}\left (\frac{1-4 x}{\sqrt{23}}\right )}{8464 \sqrt{23}}+\frac{825}{32} \log \left (3-x+2 x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0362954, size = 84, normalized size = 1. \[ -\frac{121 (12828 x-21193)}{33856 \left (2 x^2-x+3\right )}+\frac{1331 (45 x-17)}{1472 \left (2 x^2-x+3\right )^2}+\frac{825}{32} \log \left (2 x^2-x+3\right )+\frac{125 x}{8}-\frac{165099 \tan ^{-1}\left (\frac{4 x-1}{\sqrt{23}}\right )}{8464 \sqrt{23}} \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + 3*x + 5*x^2)^3/(3 - x + 2*x^2)^3,x]

[Out]

(125*x)/8 + (1331*(-17 + 45*x))/(1472*(3 - x + 2*x^2)^2) - (121*(-21193 + 12828*x))/(33856*(3 - x + 2*x^2)) -
(165099*ArcTan[(-1 + 4*x)/Sqrt[23]])/(8464*Sqrt[23]) + (825*Log[3 - x + 2*x^2])/32

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 63, normalized size = 0.8 \begin{align*}{\frac{125\,x}{8}}+{\frac{11}{2\, \left ( 2\,{x}^{2}-x+3 \right ) ^{2}} \left ( -{\frac{35277\,{x}^{3}}{2116}}+{\frac{303677\,{x}^{2}}{8464}}-{\frac{132803\,x}{4232}}+{\frac{326029}{8464}} \right ) }+{\frac{825\,\ln \left ( 2\,{x}^{2}-x+3 \right ) }{32}}-{\frac{165099\,\sqrt{23}}{194672}\arctan \left ({\frac{ \left ( -1+4\,x \right ) \sqrt{23}}{23}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^2+3*x+2)^3/(2*x^2-x+3)^3,x)

[Out]

125/8*x+11/2*(-35277/2116*x^3+303677/8464*x^2-132803/4232*x+326029/8464)/(2*x^2-x+3)^2+825/32*ln(2*x^2-x+3)-16
5099/194672*23^(1/2)*arctan(1/23*(-1+4*x)*23^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.45442, size = 97, normalized size = 1.15 \begin{align*} -\frac{165099}{194672} \, \sqrt{23} \arctan \left (\frac{1}{23} \, \sqrt{23}{\left (4 \, x - 1\right )}\right ) + \frac{125}{8} \, x - \frac{121 \,{\left (12828 \, x^{3} - 27607 \, x^{2} + 24146 \, x - 29639\right )}}{16928 \,{\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )}} + \frac{825}{32} \, \log \left (2 \, x^{2} - x + 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^3/(2*x^2-x+3)^3,x, algorithm="maxima")

[Out]

-165099/194672*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) + 125/8*x - 121/16928*(12828*x^3 - 27607*x^2 + 24146*x
 - 29639)/(4*x^4 - 4*x^3 + 13*x^2 - 6*x + 9) + 825/32*log(2*x^2 - x + 3)

________________________________________________________________________________________

Fricas [A]  time = 0.985266, size = 377, normalized size = 4.49 \begin{align*} \frac{24334000 \, x^{5} - 24334000 \, x^{4} + 43385176 \, x^{3} - 330198 \, \sqrt{23}{\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )} \arctan \left (\frac{1}{23} \, \sqrt{23}{\left (4 \, x - 1\right )}\right ) + 40329281 \, x^{2} + 10037775 \,{\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )} \log \left (2 \, x^{2} - x + 3\right ) - 12446818 \, x + 82485337}{389344 \,{\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^3/(2*x^2-x+3)^3,x, algorithm="fricas")

[Out]

1/389344*(24334000*x^5 - 24334000*x^4 + 43385176*x^3 - 330198*sqrt(23)*(4*x^4 - 4*x^3 + 13*x^2 - 6*x + 9)*arct
an(1/23*sqrt(23)*(4*x - 1)) + 40329281*x^2 + 10037775*(4*x^4 - 4*x^3 + 13*x^2 - 6*x + 9)*log(2*x^2 - x + 3) -
12446818*x + 82485337)/(4*x^4 - 4*x^3 + 13*x^2 - 6*x + 9)

________________________________________________________________________________________

Sympy [A]  time = 0.300081, size = 82, normalized size = 0.98 \begin{align*} \frac{125 x}{8} - \frac{1552188 x^{3} - 3340447 x^{2} + 2921666 x - 3586319}{67712 x^{4} - 67712 x^{3} + 220064 x^{2} - 101568 x + 152352} + \frac{825 \log{\left (x^{2} - \frac{x}{2} + \frac{3}{2} \right )}}{32} - \frac{165099 \sqrt{23} \operatorname{atan}{\left (\frac{4 \sqrt{23} x}{23} - \frac{\sqrt{23}}{23} \right )}}{194672} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**2+3*x+2)**3/(2*x**2-x+3)**3,x)

[Out]

125*x/8 - (1552188*x**3 - 3340447*x**2 + 2921666*x - 3586319)/(67712*x**4 - 67712*x**3 + 220064*x**2 - 101568*
x + 152352) + 825*log(x**2 - x/2 + 3/2)/32 - 165099*sqrt(23)*atan(4*sqrt(23)*x/23 - sqrt(23)/23)/194672

________________________________________________________________________________________

Giac [A]  time = 1.13062, size = 84, normalized size = 1. \begin{align*} -\frac{165099}{194672} \, \sqrt{23} \arctan \left (\frac{1}{23} \, \sqrt{23}{\left (4 \, x - 1\right )}\right ) + \frac{125}{8} \, x - \frac{121 \,{\left (12828 \, x^{3} - 27607 \, x^{2} + 24146 \, x - 29639\right )}}{16928 \,{\left (2 \, x^{2} - x + 3\right )}^{2}} + \frac{825}{32} \, \log \left (2 \, x^{2} - x + 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^3/(2*x^2-x+3)^3,x, algorithm="giac")

[Out]

-165099/194672*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) + 125/8*x - 121/16928*(12828*x^3 - 27607*x^2 + 24146*x
 - 29639)/(2*x^2 - x + 3)^2 + 825/32*log(2*x^2 - x + 3)